

package com.hazelcast.internal.server;

/**
 * Stats per {@link ServerConnectionManager} for both directions of network traffic (inbound or outbound).
 * <p>
 * Stores number of bytes sent and received. Used only when Advanced Networking is enabled.
 */
public interface NetworkStats {

    /**
     * Returns number of bytes received over all connections (active and closed) managed by
     * the EndpointManager. Guaranteed to be monotonically increasing counter, but
     * may not show the latest total.
     *
     * @return number of received bytes
     */
    long getBytesReceived();

    /**
     * Returns number of bytes sent over all connections (active and closed) managed by
     * the EndpointManager. Guaranteed to be monotonically increasing counter, but
     * may not show the latest total.
     *
     * @return number of sent bytes
     */
    long getBytesSent();

}
